From: Florian Müllner Date: Tue, 29 Jan 2019 10:48:06 +0000 (+0100) Subject: windowManager: Add switch-to-application-n keybindings X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~897^2^2~40 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4590094605774dab4c76d67953cf032616dee089;p=gnome-shell.git windowManager: Add switch-to-application-n keybindings Having Unity-like shortcuts for activating the first nine applications in the dash has been a long requested feature, but somehow nobody got around to implement it. As the shortcut is most useful outside the overview where the dash is not visible, only consider favorite apps as they have a predictable order. https://bugzilla.gnome.org/show_bug.cgi?id=648000 --- diff --git a/data/org.gnome.shell.gschema.xml.in b/data/org.gnome.shell.gschema.xml.in index 87898a36e..24e2a75b0 100644 --- a/data/org.gnome.shell.gschema.xml.in +++ b/data/org.gnome.shell.gschema.xml.in @@ -145,6 +145,42 @@ Keybinding that pauses and resumes all running tweens, for debugging purposes + + ["<Super>1"] + Switch to application 1 + + + ["<Super>2"] + Switch to application 2 + + + ["<Super>3"] + Switch to application 3 + + + ["<Super>4"] + Switch to application 4 + + + ["<Super>5"] + Switch to application 5 + + + ["<Super>6"] + Switch to application 6 + + + ["<Super>7"] + Switch to application 7 + + + ["<Super>8"] + Switch to application 8 + + + ["<Super>9"] + Switch to application 9 + { @@ -2012,6 +2076,14 @@ var WindowManager = class { Main.ctrlAltTabManager.popup(binding.is_reversed(), binding.get_name(), binding.get_mask()); } + _switchToApplication(display, window, binding) { + let [,,,target] = binding.get_name().split('-'); + let apps = AppFavorites.getAppFavorites().getFavorites(); + let app = apps[target - 1]; + if (app) + app.activate(); + } + _toggleAppMenu(display, window, event, binding) { Main.panel.toggleAppMenu(); }